//
//  OO_MyOrderViewController.m
//  ShopProject
//
//  Created by macbookpro on 2018/9/30.
//  Copyright © 2018年 ShopProject. All rights reserved.
//

#import "OO_MyOrderViewController.h"
#import "CorePagesView.h"
#import "OO_ToBePaidViewController.h"
#import "OO_PendingReceiptViewController.h"
#import "OO_WaitSendViewController.h"
@interface OO_MyOrderViewController ()
@property (nonatomic,strong) CorePagesView *pagesView;
@end
@implementation OO_MyOrderViewController
-(void)loadView{
    self.view = self.pagesView;
}
- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"我的订单";
}
-(CorePagesView *)pagesView{
    if(_pagesView==nil){
        OO_ToBePaidViewController *tvc1 = [[OO_ToBePaidViewController alloc] init];
        OO_WaitSendViewController *tvc2 = [[OO_WaitSendViewController alloc] init];
        OO_PendingReceiptViewController *tvc3 = [[OO_PendingReceiptViewController alloc] init];
        CorePageModel *model1=[CorePageModel model:tvc1 pageBarName:@"待付款"];
        CorePageModel *model2=[CorePageModel model:tvc2 pageBarName:@"待发货"];
        CorePageModel *model3=[CorePageModel model:tvc3 pageBarName:@"待收货"];
        NSArray *pageModels=@[model1,model2,model3];
        //自定义配置
        CorePagesViewConfig *config = [[CorePagesViewConfig alloc] init];
        config.isBarBtnUseCustomWidth = YES;
        config.barBtnWidth = [UIScreen mainScreen].bounds.size.width/3.0;
        config.barViewH = 46;
        _pagesView=[CorePagesView viewWithOwnerVC:self pageModels:pageModels config:config];
    }
    return _pagesView;
}
@end
